/*
 Navicat Premium Data Transfer

 Source Server         : mysql
 Source Server Type    : MySQL
 Source Server Version : 80028
 Source Host           : localhost:3306
 Source Schema         : carteam

 Target Server Type    : MySQL
 Target Server Version : 80028
 File Encoding         : 65001

 Date: 16/04/2023 13:04:43
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for auction
-- ----------------------------
DROP TABLE IF EXISTS `auction`;
CREATE TABLE `auction` (
  `id` int NOT NULL AUTO_INCREMENT,
  `description` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `admin` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `rsu` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `ev` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `publish_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `task_id` varchar(100) DEFAULT NULL COMMENT '选择的任务（从defaultTask里选择）',
  `property_value` varchar(200) DEFAULT NULL COMMENT '每个属性的值（后续用来算代价）',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='记录拍卖信息';

-- ----------------------------
-- Records of auction
-- ----------------------------
BEGIN;
INSERT INTO `auction` (`id`, `description`, `admin`, `rsu`, `ev`, `publish_time`, `end_time`, `task_id`, `property_value`) VALUES (31, '怕吗', '10', '15,16', '3,4', '2023-04-15 16:46:21', NULL, '1,2', '10,10|5,5');
INSERT INTO `auction` (`id`, `description`, `admin`, `rsu`, `ev`, `publish_time`, `end_time`, `task_id`, `property_value`) VALUES (32, '周日拍卖', '3', '15,16,17', '1,2,3,4', '2023-04-16 10:19:52', NULL, '1,1,1', '10,10|20,10|30,20');
COMMIT;

-- ----------------------------
-- Table structure for auction_task
-- ----------------------------
DROP TABLE IF EXISTS `auction_task`;
CREATE TABLE `auction_task` (
  `id` int NOT NULL AUTO_INCREMENT,
  `description` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `ev` int DEFAULT NULL,
  `rsu` int DEFAULT NULL,
  `ev_to_rsu` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `rsu_to_ev` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `publish_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `auction_id` int NOT NULL,
  `task_id` varchar(100) DEFAULT NULL COMMENT 'rsu指定的任务id',
  `tasks` varchar(500) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='拍卖任务';

-- ----------------------------
-- Records of auction_task
-- ----------------------------
BEGIN;
INSERT INTO `auction_task` (`id`, `description`, `ev`, `rsu`, `ev_to_rsu`, `rsu_to_ev`, `publish_time`, `end_time`, `auction_id`, `task_id`, `tasks`) VALUES (37, 'Photo', 3, 15, '0.2', '0.23', '2023-04-15 20:51:21', NULL, 31, '1', '[{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"distance\",\"propertyCost\":1,\"propertyValue\":10},{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"number\",\"propertyCost\":5,\"propertyValue\":10}]');
INSERT INTO `auction_task` (`id`, `description`, `ev`, `rsu`, `ev_to_rsu`, `rsu_to_ev`, `publish_time`, `end_time`, `auction_id`, `task_id`, `tasks`) VALUES (40, 'Photo', 1, 15, '0.2', '0.25', '2023-04-16 12:18:44', NULL, 32, '1', '[{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"distance\",\"propertyCost\":2,\"propertyValue\":10},{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"number\",\"propertyCost\":2,\"propertyValue\":10}]');
INSERT INTO `auction_task` (`id`, `description`, `ev`, `rsu`, `ev_to_rsu`, `rsu_to_ev`, `publish_time`, `end_time`, `auction_id`, `task_id`, `tasks`) VALUES (41, 'Photo', 4, 15, '0.21', '0.28', '2023-04-16 12:18:44', NULL, 32, '1', '[{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"distance\",\"propertyCost\":2,\"propertyValue\":10},{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"number\",\"propertyCost\":2,\"propertyValue\":10}]');
INSERT INTO `auction_task` (`id`, `description`, `ev`, `rsu`, `ev_to_rsu`, `rsu_to_ev`, `publish_time`, `end_time`, `auction_id`, `task_id`, `tasks`) VALUES (42, 'Photo', 1, 16, '0.2', '0.25', '2023-04-16 12:18:44', NULL, 32, '1', '[{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"distance\",\"propertyCost\":2,\"propertyValue\":20},{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"number\",\"propertyCost\":2,\"propertyValue\":10}]');
INSERT INTO `auction_task` (`id`, `description`, `ev`, `rsu`, `ev_to_rsu`, `rsu_to_ev`, `publish_time`, `end_time`, `auction_id`, `task_id`, `tasks`) VALUES (43, 'Photo', 4, 16, '0.2', '0.28', '2023-04-16 12:18:44', NULL, 32, '1', '[{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"distance\",\"propertyCost\":2,\"propertyValue\":20},{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"number\",\"propertyCost\":2,\"propertyValue\":10}]');
INSERT INTO `auction_task` (`id`, `description`, `ev`, `rsu`, `ev_to_rsu`, `rsu_to_ev`, `publish_time`, `end_time`, `auction_id`, `task_id`, `tasks`) VALUES (44, 'Photo', 1, 17, '0.2', '0.25', '2023-04-16 12:18:44', NULL, 32, '1', '[{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"distance\",\"propertyCost\":2,\"propertyValue\":30},{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"number\",\"propertyCost\":2,\"propertyValue\":20}]');
INSERT INTO `auction_task` (`id`, `description`, `ev`, `rsu`, `ev_to_rsu`, `rsu_to_ev`, `publish_time`, `end_time`, `auction_id`, `task_id`, `tasks`) VALUES (45, 'Photo', 4, 17, '0.21', '0.28', '2023-04-16 12:18:44', NULL, 32, '1', '[{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"distance\",\"propertyCost\":2,\"propertyValue\":30},{\"taskId\":\"1\",\"taskName\":\"Photo\",\"propertyName\":\"number\",\"propertyCost\":2,\"propertyValue\":20}]');
COMMIT;

-- ----------------------------
-- Table structure for car
-- ----------------------------
DROP TABLE IF EXISTS `car`;
CREATE TABLE `car` (
  `id` int NOT NULL AUTO_INCREMENT,
  `car_name` varchar(255) NOT NULL,
  `ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `port` int DEFAULT NULL,
  `packet_name` varchar(255) DEFAULT NULL,
  `photo_number` int DEFAULT NULL,
  `energy` varchar(50) DEFAULT '100',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of car
-- ----------------------------
BEGIN;
INSERT INTO `car` (`id`, `car_name`, `ip`, `port`, `packet_name`, `photo_number`, `energy`) VALUES (1, 'mqf', '192.168.123.212', 8082, 'packetmqf', 3, '0.0');
INSERT INTO `car` (`id`, `car_name`, `ip`, `port`, `packet_name`, `photo_number`, `energy`) VALUES (2, 'hyh', '192.168.1.8', 80, 'packethyh', 0, '79.7');
INSERT INTO `car` (`id`, `car_name`, `ip`, `port`, `packet_name`, `photo_number`, `energy`) VALUES (3, 'cyz', '127.0.0.1', 8082, 'packetcyz', 2, '26.0');
INSERT INTO `car` (`id`, `car_name`, `ip`, `port`, `packet_name`, `photo_number`, `energy`) VALUES (4, 'xfy', NULL, NULL, 'packetxfy', NULL, '100');
COMMIT;

-- ----------------------------
-- Table structure for default_task
-- ----------------------------
DROP TABLE IF EXISTS `default_task`;
CREATE TABLE `default_task` (
  `id` int NOT NULL AUTO_INCREMENT,
  `task_name` varchar(100) DEFAULT NULL COMMENT '任务名',
  `description` varchar(200) DEFAULT NULL COMMENT '任务介绍',
  `property_list` varchar(200) DEFAULT NULL COMMENT '属性列表，以,分割',
  `cost_list` varchar(200) DEFAULT NULL COMMENT '每个属性对应的cost',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='预先定义的任务';

-- ----------------------------
-- Records of default_task
-- ----------------------------
BEGIN;
INSERT INTO `default_task` (`id`, `task_name`, `description`, `property_list`, `cost_list`, `create_time`) VALUES (1, 'Photo', '拍照任务', 'distance,number', '2,2', '2023-04-15 16:10:23');
INSERT INTO `default_task` (`id`, `task_name`, `description`, `property_list`, `cost_list`, `create_time`) VALUES (2, 'Video', '视频拍摄', 'distance,videoLen', '2,2', '2023-04-15 16:10:25');
COMMIT;

-- ----------------------------
-- Table structure for task
-- ----------------------------
DROP TABLE IF EXISTS `task`;
CREATE TABLE `task` (
  `id` int NOT NULL AUTO_INCREMENT,
  `taskname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `taskinfo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of task
-- ----------------------------
BEGIN;
INSERT INTO `task` (`id`, `taskname`, `taskinfo`) VALUES (1, 'task1', '利用小车拍摄照片');
INSERT INTO `task` (`id`, `taskname`, `taskinfo`) VALUES (2, '录像', '录像完成');
INSERT INTO `task` (`id`, `taskname`, `taskinfo`) VALUES (3, '测温度', '测量周围温度');
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `photo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `type` int NOT NULL COMMENT 'ev3,rsu2,admin1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=108 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (1, 'mqf', '$2a$10$ob2hUlp/5T1ER20PfwzDV.fUzqXsEDRcH8i/Q/XtWesDUSCAV5bVe', 'https://www.acwing.com/user/profile/index/', 3);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (2, 'hyh', '$2a$10$mtAFDQdmVXKHnxSls/5M/OidWrnhTeQKOpaU8p6Rj0CxUf/6BCuYy', 'https://www.acwing.com/user/profile/index/', 3);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (3, 'cyz', '$2a$10$uqoMAnJlDirAYo9DY/uPmezYgEckjp1Ucft6Muic7oibDaMVDOBKu', 'https://www.acwing.com/user/profile/index/', 3);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (4, 'xfy', '$2a$10$c9N5XbkuAloVDITxyJLAnu9e.aKHhjkDjS1KQQ6mGQDpX.QGPBIsy', 'https://www.acwing.com/user/profile/index/', 3);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (15, 'RSU1', '$2a$10$ytVxrIDKeHZ7zfBuzXX4ZuNgrCgN5qfiPhKLAkrHcsufBJPn72Fka', 'https://www.acwing.com/user/profile/index/', 2);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (16, 'RSU2', '$2a$10$qHyBVG4cbSRix/wN3OffkuCemIZnn1Aaj8wL79fg1XqI5mZwASxju', 'https://www.acwing.com/user/profile/index/', 2);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (17, 'RSU3', '$2a$10$FhwvcmVAyhOoQ3Ay21LHvOdVQ3ilozyAo90WGzFV4M6YNF/w4enZi', 'https://www.acwing.com/user/profile/index/', 2);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (18, 'RSU4', '$2a$10$peGwZrldqYDJTcOKF1MIzuyOwHizGEua8Qwk.Aj/4lMx.f9Xf0v.6', 'https://www.acwing.com/user/profile/index/', 2);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (101, 'mqfmqf', '$2a$10$wzAzywrNOz9a6pCCiB/XzuJ1BthGsSwaJYWX3ijP2LchSb/8EwIRS', 'https://www.acwing.com/user/profile/index/', 1);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (102, 'hahaha', '$2a$10$UCT3MfEkxwBIAPAYa27bEeRs6Kak6ApIlL21DDm1PwPIoslvXVflS', 'https://www.acwing.com/user/profile/index/', 1);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (103, 'hyh哈哈哈', '$2a$10$HYClUr.yzv3.GXPeB5swT.A8.jxRlksfqVD8DVcHwMwshgsAz5JA2', 'https://www.acwing.com/user/profile/index/', 1);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (104, 'yhy', '$2a$10$IkppO0ip8lnqT69IEBCMpuxlP7ZHULgbxKPjVn1gtF97ihiGv3x.e', 'https://www.acwing.com/user/profile/index/', 1);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (105, 'hyh123', '$2a$10$7In0AlA0IrZfEeIT2sbt4.YUh4qOGHtr/G3R64WuFpop9QWfg0vca', 'https://www.acwing.com/user/profile/index/', 1);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (106, 'hyh32', '$2a$10$IJtSTw3I6qqr8DTw3/oRa.jhKdV6cXMpAFSNVnMMDm.e6TJWYr.Ti', 'https://www.acwing.com/user/profile/index/', 2);
INSERT INTO `user` (`id`, `username`, `password`, `photo`, `type`) VALUES (107, 'hyh111', '$2a$10$wf25VWVsptWgOHNYfiHy1envc1WMVxlaNSGvXDIVraSHUWfoSCknq', 'https://www.acwing.com/user/profile/index/', 2);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
